#!/usr/bin/expect # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Desktop Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description - Script to set/change firmware password # Script Arguments - "" "" # Configuration Type - Computer oldPasswd = $1 newPasswd = $2 # mode = $3 spawn firmwarepasswd -setpasswd expect { "Enter password:" { send "Password\r" # if not set already, this can be nil/random value exp_continue } "Enter new password:" { send "Password\r" # this can be passed as arguments exp_continue } "Re-enter new password:" { send "Password\r" # this can be passed as arguments exp_continue } } firmwarepasswd -setmode command # can be set as full mode as well